using System;
using bitzhuwei.Compiler;

namespace bitzhuwei.GLSLFormat {
    /// <summary>
    /// Correspond to the Vn node switch_statement_list in the grammar(GLSL).
    /// </summary>
    internal partial class Vnswitch_statement_list : IFullFormat {
        // [329] switch_statement_list = null ;
        // [330] switch_statement_list = statement_list ;


        private readonly IFullFormat complex;

        private readonly TokenRange _scope;
        public TokenRange Scope => _scope;
        public void FullFormat(BlankConfig? preConfig, TextWriter writer, FormatContext context) {
            context.PrintBlanksAnd(this.complex, preConfig, writer);
        }


        // [329] switch_statement_list = null ;
        public Vnswitch_statement_list() {
            this.complex = new complex0();
            this._scope = TokenRange.empty();
        }
        class complex0 : IFullFormat {
            private readonly TokenRange _scope;
            public TokenRange Scope => _scope;
            public void FullFormat(BlankConfig? preConfig, TextWriter writer, FormatContext context) {
            }
            public complex0() {
                this._scope = TokenRange.empty();
            }
        }

        // [330] switch_statement_list = statement_list ;
        public Vnswitch_statement_list(Vnstatement_list r0) {
            this.complex = new complex1(r0);
            this._scope = new TokenRange(r0);
        }
        class complex1 : IFullFormat {
            private readonly TokenRange _scope;
            public TokenRange Scope => _scope;
            public void FullFormat(BlankConfig? preConfig, TextWriter writer, FormatContext context) {
                context.PrintBlanksAnd(r0, preConfig, writer);
            }
            public readonly Vnstatement_list r0;
            public complex1(Vnstatement_list r0) {
                this.r0 = r0;
                this._scope = new TokenRange(r0);
            }
        }



    }
}
